<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/1/8
 * Time: 14:57
 */

namespace Auth\Model;
use Think\Model;

class AuthGroupModel extends Model{


    /**
     * 自动验证
     */
    protected $_validate = array(
        array('roles','require','规则必须',self::EXISTS_VALIDATE),
    );



    /**
     * 获取 单条数据
     */
    public function getOne($map, $filed=true){
        return $this->where($map)->field($filed)->find();
    }
}